package dominia.game;

public class Terrain {

	public static final int	MOUNTAIN = 0x01;
	public static final int PLAIN    = 0x02;
	public static final int FOREST   = 0x04;
	public static final int ISLAND   = 0x08;
	public static final int SWAMP    = 0x10;

	private int		type;

	public Terrain(int type)
	{
		this.type = type;
	}

	public int getType()
	{
		return this.type;
	}

	public boolean isMountain()
	{
		return ((this.type & MOUNTAIN) == MOUNTAIN) ? true : false;
	}

	public boolean isPlain()
	{
		return ((this.type & PLAIN) == PLAIN) ? true : false;
	}

	public boolean isForest()
	{
		return ((this.type & FOREST) == FOREST) ? true : false;
	}

	public boolean isIsland()
	{
		return ((this.type & ISLAND) == ISLAND) ? true : false;
	}

	public boolean isSwamp()
	{
		return ((this.type & SWAMP) == SWAMP) ? true : false;
	}
}
